﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class register : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DataClassesDataContext a1 = new DataClassesDataContext();
        a1.insert_users(TextBox1.Text, TextBox2.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text);
        a1.insert_answer(TextBox1.Text, DropDownList1.Text, TextBox7.Text);
        a1.insert_answer(TextBox1.Text, DropDownList2.Text, TextBox8.Text);
        Response.Write("<script>alert('注册成功！')</script>");
        Response.Redirect("~/homepage.aspx");
    }
    protected void TextBox7_TextChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }
}